-- rustaceanvim 封装了 rust-analyzer 相关的命令

local wk = require("which-key")

wk.add({
  { "<leader>ar", group = 'Rust' }
})

return {
  {
    "mrcjkb/rustaceanvim",
    version = '^5', -- Recommended
    lazy = false,   -- This plugin is already lazy
    keys = {
      -- 宏展开
      {
        "<leader>are",
        function()
          print("Rust 宏展开")
          vim.cmd.RustLsp("expandMacro")
        end,
        desc = '展开宏'
      },

      -- rust-analyzer 提供的一些生成功能
      {
        '<leader>ara',
        function()
          vim.cmd.RustLsp('codeAction')
        end,
        desc = 'Grouped code actions',
      },
    }
  }
}
